package com.hnevc.xiewenguang;

import java.util.Scanner;

public class Example03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两个整数");
          //接收用户输入的数字
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
          //i小于两个值相乘
        for (int i=num1 ; i<=num1*num2; i++){
          //进行最小公倍数判断
            if (i%num1==0&&i%num2==0){
                System.out.println(num1+"与"+num2+"的最小公倍数为"+i);
          //取到值之后即刻退出
                break;
            }
        }
    }
}

